<template>
  <div id="index">
    <el-button @click="$router.push('/stall')">安防态势-车位管理</el-button>
    <el-button @click="$router.push('/environment')">安防态势-环境监测</el-button>
    <el-button @click="$router.push('/energy')">安防态势-能耗分析</el-button>
    <el-button @click="$router.push('/alarmType')">报警-报警分类</el-button>
    <el-button @click="$router.push('/realtimeAlarm')">报警-实时报警记录</el-button>
    <el-button @click="$router.push('/alarmStatistics')">报警-报警统计</el-button>
    <el-button @click="$router.push('/alarmComparison')">报警-报警对比</el-button>
    <el-button @click="$router.push('/alarmHistory')">报警-报警历史记录</el-button>
    <el-button @click="$router.push('/monitoringNum')">监控-监控数量</el-button>
    <el-button @click="$router.push('/monDeviceType')">监控-设备类型</el-button>
    <el-button @click="$router.push('/devicemanagement')">入侵-设备管理</el-button>
    <el-button @click="$router.push('/alarmRecord')">入侵-报警记录</el-button>
    <el-button @click="$router.push('/alarmStatistics')">入侵-入侵报警统计</el-button>
    <el-button @click="$router.push('/broadcastManagement')">广播-设备管理</el-button>
    <!-- <router-link to="/stall">安防态势-车位管理</router-link> -->
    <el-button @click="$router.push('/playbackRecord')">广播-播放记录</el-button>
    <el-button @click="$router.push('/playTime')">广播-播放时间统计</el-button>
    <el-button @click="$router.push('/numDevices')">门禁-设备数量</el-button>
    <el-button @click="$router.push('/cardSwipingRecord')">门禁-刷卡记录</el-button>
    <el-button @click="$router.push('/cardSwipingStatistics')">门禁-刷卡统计</el-button>
    <el-button @click="$router.push('/illDistribution')">照明-照明分布</el-button>
    <el-button @click="$router.push('/consumptionAccounting')">照明-照明用电统计</el-button>
    <el-button @click="$router.push('/liftNum')">电梯-设备数量</el-button>
    <el-button @click="$router.push('/airConditioning')">机组-设备数量</el-button>
    <el-button @click="$router.push('/equipmentOperation')">机组-设备运行数据</el-button>
    <el-button @click="$router.push('/fireEquipment')">消防-设备管理</el-button>
    <el-button @click="$router.push('/fireAlarmRecords')">消防-报警记录</el-button>
    <el-button @click="$router.push('/fireAlarmStatistics')">消防-报警统计</el-button>
    <el-button @click="$router.push('/statistics')">能耗-能耗统计</el-button>

    <el-button @click="$router.push('/reportForms')">能耗-能耗报表</el-button>
    <el-button @click="$router.push('/analysis')">能耗-能耗分析</el-button>
    <el-button @click="$router.push('/patrolFrequency')">巡更-巡更次数</el-button>
    <!-- <el-button @click="$router.push('/patrolPersonnelNum')">巡更-巡更人数</el-button> -->

    <el-button @click="$router.push('/patrolRecords')">巡更-巡更记录</el-button>
    <el-button @click="$router.push('/entryAndExitRecords')">停车场-出入记录</el-button>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {};
  },
  mounted() {
    this.winSize();
    window.onresize = () => {
      return (() => {
        var ratioX = window.innerWidth / 370;
        var ratioY = window.innerHeight / 880;

        window.document.body.style.transform = `scale( ${ratioY} )`;
        window.document.body.style.transformOrigin = "0px 0px";
      })();
    };
  },
  methods: {
    // 自适应
    winSize() {
      var ratioY = window.innerHeight / 880;
      var ratioX = window.innerWidth / 370;
      window.document.body.style.transform = `scale( ${ratioY} )`;
      window.document.body.style.transformOrigin = "0px 0px";
    },
  },
};
</script>

<style scoped lang="less">
#index {
  width: 1712px;
  height: 880px;
  padding: 50px 40px;

  box-sizing: border-box;
  // background: rgba(0, 0, 0, 0.6);
  // background: url(../../assets/方框底图.png) 0 0 no-repeat;
  // background-size:100% 100%;
}
</style>
